<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
if(!isset($title)){
	$title = "OnlineShop";
}
include_once '../Page/authentic.php';//session_start();

?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title;?></title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link href="../css/<?php echo $css;?>" rel="stylesheet" type="text/css" />

<script src="../js/top.js" type="text/javascript"></script>
</head>

<body>
	<div id="float_user">
		<div id="float_user_nav">
			<div id="float_user_nav_left">
				<?php 
				if(!$_SESSION["Passed"]){//not pass
				?>
				<form action="login.php" method="post">
					<p>
						UserName:<input type="text" name="name"  autocomplete="off"/>
						Password:<input type="password" name="password"  autocomplete="off"/>
						<input type="submit" value="Login" />
					</p>
				</form>
				<a href="regedit.php">Register</a>
				<?php 
				}else{
				?>
				<div id="hello">
					<b><?php echo $_SESSION['User']["userName"];?></b>
					<p>Hello，Welcome to online-shop</p>
				</div>
				<?php 
				}
				?>
			</div>
			<?php 
			if($_SESSION["Passed"]){//pass
			?>
			<div id="float_user_nav_right">
				<a href="personal.php">Personal Manage</a>
				<p>|</p>
				<a href="itemList.php">Design List</a>
				<p>|</p>
				<a href="cart.php">Shopping Cart</a>
				<p>|</p>
				<a href="logout.php">Logout</a>
			</div>
			<?php 
			}
			?>
		</div>
	</div>
	<div id="container">
		<div id="container_top">
			<div id="container_logo">
				<a href="index.php">
					<img src="../image/logo.png" alt="NJU-onlineshop" />
				</a>
			</div>
			<div id="container_search">
				<div id="container_search_tips">
					<ul id="container_search_tips_ul">
						<li id="search_first_tab">
							<div class="ls"></div>
							<a href="javascript:;">Category1</a>
							<div class="rs"></div>
						</li>
						<li>
							<div class="ls"></div>
							<a href="javascript:;">Category2</a>
							<div class="rs"></div>
						</li>
						<li>
							<div class="ls"></div>
							<a href="javascript:;">Category3</a>
							<div class="rs"></div>
						</li>
						<li>
							<div class="ls"></div>
							<a href="javascript:;">Category4</a>
							<div class="rs"></div>
						</li>
						<script type="text/javascript">
						initSearchTips();
						</script>
					</ul>
				</div>
				<div id="container_search_context">
					<div class="ls"></div>
					<form action="search.php" method="post">
						<input type="text" name="key" value=""/>
						<input type="submit"" value="Search"/>
					</form>
					<div class="rs"></div>
				</div>
			</div>
		</div>
		<div id="container_body">